package com.ljx.thread.thread05;

/**
 * @author LJX
 * @Description: TODO
 * @Date: 2022/11/1 17:03
 * @Version 1.0
 */
public class AThread extends Thread{
	private BrushAndBoard brushAndBoard;

	public AThread(BrushAndBoard brushAndBoard) {
		this.brushAndBoard = brushAndBoard;
	}



	@Override
	public void run() {
		synchronized (brushAndBoard.getBoard()){
			System.out.println("A线程获取画板");
			synchronized (brushAndBoard.getBrush()){
				System.out.println("A线程获取画笔");
			}
		}
	}
}
